const staticList = [
  {
    label: "编码",
    value: "fireId",
  },
  {
    label: "规格",
    value: "fireSize",
  },
  {
    label: "型号",
    value: "fireModel",
  },
  {
    label: "责任科队",
    value: "fireDept",
  },
  {
    label: "负责人",
    value: "firePerson",
  },
  {
    label: "责任部门",
    value: "fireDepartment",
  },
  {
    label: "检查",
    value: "fireIssearch",
  },
  {
    label: "灭火器所在位置",
    value: "fireAddress",
  },
  {
    label: "上次巡检日期",
    value: "fireLastDetectionTime",
  },
  {
    label: "生产日期",
    value: "fireCreateTime",
  },
  {
    label: "灭火器类型",
    value: "fireType",
  },
  {
    label: "灭火器描述",
    value: "fireDescribe",
  },
  {
    label: "灭火器区域",
    value: "fireArea",
  },
  {
    label: "保质期年",
    value: "fireTerm",
  },
  {
    label: "下次送检日期",
    value: "fireLastInspectTime",
  },
  {
    label: "负责人领导",
    value: "firePersonLeader",
  },
  {
    label: "安全员",
    value: "firePersonSafety",
  },
  {
    label: "更新时间",
    value: "updateTime",
  },
  {
    label: "更新人",
    value: "updateUser",
  },
];
const cabinetInfo = [
  {
    label: "机柜编码",
    value: "id",
  },
  {
    label: "机柜规格",
    value: "cabinetSize",
  },
  {
    label: "供电信息",
    value: "cabinetPower",
  },
  {
    label: "资产归属",
    value: "cabinetGroup",
  },
];
const cabinetColumns = [
  {
    title: "机器连线列表",
    dataIndex: "connections",
    key: "connections",
    width: 130,
    align: "center",
    scopedSlots: { customRender: "connections" },
  },
  {
    title: "机器编码",
    dataIndex: "id",
    key: "id",
    width: 80,
    align: "center",
  },
  {
    title: "所属机柜",
    dataIndex: "cabinetId",
    key: "cabinetId",
    width: 80,
    align: "center",
  },
  {
    title: "通用机柜",
    dataIndex: "universalCabinet",
    key: "universalCabinet",
    align: "center",
    width: 130,
  },
  {
    title: "设备用途",
    dataIndex: "machinePurpose",
    key: "machinePurpose",
    width: 140,
    align: "center",
  },
  {
    title: "设备型号厂家",
    dataIndex: "machineSize",
    key: "machineSize",
    width: 140,
    align: "center",
  },
  {
    title: "系列号",
    dataIndex: "machineNumber",
    key: "machineNumber",
    width: 200,
    align: "center",
  },
  {
    title: "设备运行开始时间",
    dataIndex: "machineSttime",
    key: "machineSttime",
    width: 130,
    align: "center",
  },
  {
    title: "维保开始时间",
    dataIndex: "maintenanceSttime",
    key: "maintenanceSttime",
    width: 130,
    align: "center",
  },
  {
    title: "维保结束时间",
    dataIndex: "maintenanceEndtime",
    key: "maintenanceEndtime",
    width: 130,
    align: "center",
  },
];
const backDataFormat = (d) => {
  let res = {
    companyFlow: [],
    companyFlowByDay: [],
    monthflowByYear: [],
  };
  res["companyFlow"].push(
    {
      label: "作业总量",
      value: d.companySumFlow,
      color: "color1",
    },
    {
      label: "年度作业量",
      value: d.companyFlowForYear,
      color: "color2",
    },
    {
      label: "本月作业量",
      value: d.companyFlowForMonth,
      color: "color3",
    },
    {
      label: "今日作业量",
      value: d.companyFlowForDay,
      color: "color4",
    },
    {
      label: "闭环率",
      value: d.bhRate,
      color: "color5",
    },
    {
      label: "作业模板数",
      value: d.companyFowType,
      color: "color6",
    }
  );
  res["companyFlowByDay"] = d["companyFlowByDay"].map((v) => {
    return {
      ...v,
      label: v.name,
      value: Number(v.num),
    };
  });
  res["monthflowByYear"] = d["monthflowByYear"].map((v) => {
    return {
      ...v,
      label: v.name,
      value: Number(v.num),
    };
  });
  res["companyMaxFlow"] = d["companyMaxFlow"];
  return res;
};
export { staticList, cabinetInfo, cabinetColumns, backDataFormat };
